package com.hunttown.mes.rpc.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * created by wangjunfu on 2019-07-06 10:58:53
 */
public class TransportUserCardDTO implements Serializable {
    private Integer id;
    private Integer entId;
    private Integer userId;
    private String cardNo;
    private Integer cardType;
    private BigDecimal cardValue;
    private BigDecimal cashValue;
    private BigDecimal addUpValue;
    private Integer validTimes;
    private Integer surplusTimes;
    private Integer giveTimes;
    private Integer addUpTimes;
    private Date startTime;
    private Date endTime;
    private String remark;
    private Integer adminId;
    private Date createTime;
    private Integer stopFlag;
    private Integer deleteFlag;

    private String startTimeSr;
    private String endTimeSr;
    private String trueName;

    //以下内容由Alt+Ins快捷生成

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEntId() {
        return entId;
    }

    public void setEntId(Integer entId) {
        this.entId = entId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public Integer getCardType() {
        return cardType;
    }

    public void setCardType(Integer cardType) {
        this.cardType = cardType;
    }

    public BigDecimal getCardValue() {
        return cardValue;
    }

    public void setCardValue(BigDecimal cardValue) {
        this.cardValue = cardValue;
    }

    public BigDecimal getCashValue() {
        return cashValue;
    }

    public void setCashValue(BigDecimal cashValue) {
        this.cashValue = cashValue;
    }

    public BigDecimal getAddUpValue() {
        return addUpValue;
    }

    public void setAddUpValue(BigDecimal addUpValue) {
        this.addUpValue = addUpValue;
    }

    public Integer getValidTimes() {
        return validTimes;
    }

    public void setValidTimes(Integer validTimes) {
        this.validTimes = validTimes;
    }

    public Integer getSurplusTimes() {
        return surplusTimes;
    }

    public void setSurplusTimes(Integer surplusTimes) {
        this.surplusTimes = surplusTimes;
    }

    public Integer getGiveTimes() {
        return giveTimes;
    }

    public void setGiveTimes(Integer giveTimes) {
        this.giveTimes = giveTimes;
    }

    public Integer getAddUpTimes() {
        return addUpTimes;
    }

    public void setAddUpTimes(Integer addUpTimes) {
        this.addUpTimes = addUpTimes;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStopFlag() {
        return stopFlag;
    }

    public void setStopFlag(Integer stopFlag) {
        this.stopFlag = stopFlag;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getStartTimeSr() {
        if (startTimeSr == null || startTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");

            if (startTime == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(startTime.getTime()));
            }
        } else {
            return startTimeSr;
        }
    }

    public void setStartTimeSr(String startTimeSr) {
        this.startTimeSr = startTimeSr;
    }

    public String getEndTimeSr() {
        if (endTimeSr == null || endTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");

            if (endTime == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(endTime.getTime()));
            }
        } else {
            return endTimeSr;
        }
    }

    public void setEndTimeSr(String endTimeSr) {
        this.endTimeSr = endTimeSr;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }
}